package com.zhangshuo.test2.controller;

import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.plugins.Page;
import com.zhangshuo.test2.entity.SmsInAll;
import com.zhangshuo.test2.service.ISmsInAllService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

/**
 * <p>
 * 收件箱 前端控制器
 * </p>
 *
 * @author 张硕
 * @since 2017-05-31
 */
@Controller
@RequestMapping("/test2/smsInAll")
public class SmsInAllController {

    @Autowired
    private ISmsInAllService iSmsInAllService;


    @RequestMapping("/list")
    @ResponseBody
    public List<SmsInAll> list(){
        Page<SmsInAll> page =  new Page<>();
        page.setCurrent(1);
        page.setSize(2);
        iSmsInAllService.selectPage(page,new EntityWrapper<>());
        return page.getRecords();
    }
}
